package com.bill.springcloud.hystrix.feign.controller;

import com.bill.springcloud.hystrix.feign.service.HelloFeignService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @fileName: HelloController.java
 * @author: bin.li01
 * @date: 2018/2/1 10:57
 * @version: v1.0.0
 */
@RestController
public class HelloFeignController {

    @Resource
    private HelloFeignService helloFeignService;

    @RequestMapping(value = "feign",method = RequestMethod.GET)
    public String hello(@RequestParam String name){
        return helloFeignService.helloFromEurekaClient(name);
    }

}
